package core;

import java.util.Hashtable;


public class EventInformation {
	private EventInformation(){}
	
	private static EventInformation instance = new EventInformation();
	  
	public static EventInformation getInstance() 
	{
		return instance;	
	}
  
	private static Hashtable eventsDB = new Hashtable();
  
	static 
	{
		eventsDB.put("Evento_11", new Integer(5));
		eventsDB.put("Evento_22", new Integer(6));
		eventsDB.put("Evento_33",new Integer(8));
		eventsDB.put("Evento_44", new Integer(9));
		
	}
	
	public Integer getEventDuration(String evt)
	{
		return (Integer) eventsDB.get(evt);
	}
  
	public EventInfo collectInfo(AllEvents evt)
	{
		String evts[] = evt.getEvents();
		EventInfo info = new EventInfo();
		for (int i=0; i<evts.length; i++) 
		{
			info.addEvent(evts[i], getEventDuration(evts[i]));
			
		}
  	
		return info;
	}
	
	

}
